# class Person:
#     def __init__(self,name):
#         self.name = name
#
#     def eat(self):
#         print('---->eate1')
#
#     def eat(self,food):
#         print('---->eate:',food)
#
# p = Person('tom')
# p.eat('苹果')
print('---------------------------------------------------')

# class A:
#     def test(self):
#         print('----A--test')
#
# class B:
#     def test1(self):
#         print('----B--test')
#
# class C(A,B): # 多重继承
#     def test2(self):
#         print('----C--test')
#
# c = C()
# c.test()
# c.test1()
# c.test2()
print('---------------------------------------------------')

class Base:
    def test(self):
        print('----Base--test')

class A(Base):
    def test(self):
        print('----A--test')

class B(Base):
    def test1(self):
        print('----B--test')

class C(Base):
    def test2(self):
        print('----C--test')

class D(A,B,C):
    pass

d = D()
d.test()
import inspect

print(inspect.getmro(D))  # 查看继承顺序 依据:广度优先
print(D.__mro__)
